Semantics of OCL Operation Specifications
نویسندگان
چکیده
The semantics of OCL operation specifications is discussed from a model theoretic perspective. It is argued that the semantics of operation specifications as defined in the OCL 2.0 proposal is not compatible with the view of operation specifications as contracts between a client and a supplier. As a solution, a semantics of OCL operation specifications based on standard model theory is presented. This semantics introduces the concept of a model over a UML class signature — which is a labelled transition system with output — together with a notion of the satisfiability of an OCL operation specification w.r.t. a model. The models respect the OCL features for methods with and without results, constructors, and queries. Regarding inheritance, the combination of several OCL operation specifications is introduced based on a lattice structure on models with respect to generalisation and refinement. Satisfiability is parametric in the underlying signature, and thus the notion can be transferred from UML class signatures to signatures including invariants.
منابع مشابه
OCL and Graph-Transformations - A Symbiotic Alliance to Alleviate the Frame Problem
Many popular methodologies are influenced by Design by Contract. They recommend to specify the intended behavior of operations in an early phase of the software development life cycle. Formal contract specification languages, however, are still rarely used because their semantics often mismatch the needs of software developers. Restrictive specification languages usually suffer from the ”frame ...
متن کاملCoverage of OCL Operation Specifications and Invariants
We consider operation coverage of OCL operation specifications and invariants in class diagrams with respect to sequence diagrams. The coverage criteria are based on the operations that are executed from the sequence diagrams and their asserted OCL subexpressions. We propose an algorithm that automatically generates a set of sequence diagrams in order to maximise these coverage criteria. A mode...
متن کاملA Proposal for a Formal OCL Semantics in Isabelle/HOL
We present a formal semantics as a conservative shallow embedding of the Object Constraint Language (OCL). OCL is currently under development within an open standardization process within the OMG; our work is an attempt to accompany this process by a proposal solving open questions in a consistent way and exploring alternatives of the language design. Moreover, our encoding gives the foundation...
متن کاملExtending OCL with Null-References: Towards a Formal Semantics for OCL 2.1
From its beginnings, OCL is based on a strict semantics for undefinedness, with the exception of the logical connectives of type Boolean that constitute a three-valued propositional logic. Recent versions of the OCL standard added a second exception element, which, similar to the null references in object-oriented programming languages, is given a non-strict semantics. Unfortunately, this exten...
متن کاملAlgebraic Semantics of OCL-Constrained Metamodel Specifications
In the definition of domain-specific languages a MOF metamodel is used to define the main types of its abstract syntax, and OCL invariants are used to add semantic constraints. The semantics of a metamodel definition can be given as a model type whose values are well-formed models. A model is said to conform to its metamodel when it is a value of the corresponding model type. However, when OCL ...
متن کاملذخیره در منابع من
با ذخیره ی این منبع در منابع من، دسترسی به آن را برای استفاده های بعدی آسان تر کنید
برای دانلود متن کامل این مقاله و بیش از 32 میلیون مقاله دیگر ابتدا ثبت نام کنید
ثبت ناماگر عضو سایت هستید لطفا وارد حساب کاربری خود شوید
ورودعنوان ژورنال:
- Electr. Notes Theor. Comput. Sci.
دوره 102 شماره
صفحات -
تاریخ انتشار 2004